<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			function f1(){
				$("th").css("background-color", "yellow");
				$("tr:even").css("background-color", "green");
			}

		</script>
	</head>
	<body>
		<table border="" cellspacing="" cellpadding="">
			<tr>
				<th>序号</th>
				<th colspan="2">名称</th>
				<th>价格</th>
				<th>数量</th>
			</tr>
			<tr>
				<td>1</td>
				<td colspan="2">HTC</td>
				<td>3200</td>
				<td>10</td>
			</tr>
			<tr>
				<td>2</td>
				<td colspan="2">Apple</td>
				<td>4400</td>
				<td>13</td>
			</tr>
			<tr>
				<td>3</td>
				<td colspan="2">Nokia</td>
				<td>2300</td>
				<td>22</td>
			</tr>
			<tr>
				<td>4</td>
				<td colspan="2">Samsung</td>
				<td>3500</td>
				<td>35</td>
			</tr>
			<tr>
				<td>5</td>
				<td colspan="2">Heimei</td>
				<td>2500</td>
				<td>27</td>
			</tr>
			
		</table>
		<button type="button" onclick="f1()" >触发 </button>
	</body>
</html>
